package main

import (
	"fmt"
	"time"
)

// for range timer 定时循环

func main() {
	ticker := time.NewTicker(5 * time.Second)
	defer ticker.Stop()

	var count int
	for range ticker.C {
		count++
		fmt.Println(count)
	}
}
